package com.fgw.dao;

import com.fgw.pojo.Teacher;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface TeacherMapper {

    int deleteByPrimaryKey(Integer tid);

    int insert(Teacher record);

    int insertSelective(Teacher record);

    Teacher selectByPrimaryKey(Integer tid);

    int updateByPrimaryKeySelective(Teacher record);

    int updateByPrimaryKey(Teacher record);

    List<Teacher> selectAllTeacher();

    int ckeakTusername(String tuser);

    Teacher selectTeacherLogin(@Param("tuser") String tuser,@Param("tpassword") String tpassword);

    /**
     * 通过用户名查询用户
     * @param tuser
     * @return
     */
    public Teacher getByUsername(String tuser);

    /**
     * 通过用户名查询角色信息
     * @param tuser
     * @return
     */
    public Set<String> getRoles(String tuser);

    /**
     * 通过用户名查询权限信息
     * @param tuser
     * @return
     */
    public Set<String> getPermissions(String tuser);


    List<Teacher> selectAllAdminTeacher();


}